import request from "@/utils/request";

// 查询音乐作品列表
export function listMusic(query) {
  return request({
    url: "/music/music/list",
    method: "get",
    params: query,
  });
}

// 查询音乐作品详细
export function getMusic(musicId) {
  return request({
    url: "/music/music/" + musicId,
    method: "get",
  });
}

// 新增音乐作品
export function addMusic(data) {
  return request({
    url: "/music/music",
    method: "post",
    data: data,
  });
}

// 修改音乐作品
export function updateMusic(data) {
  return request({
    url: "/music/music",
    method: "put",
    data: data,
  });
}

// 删除音乐作品
export function delMusic(musicId) {
  return request({
    url: "/music/music/" + musicId,
    method: "delete",
  });
}
